﻿@model List<MVC3MusicStore.Models.Album> 
@{
    ViewBag.Title = "ASP.NET MVC 3 Music Store";
    ViewBag.Active = "Home";
    Layout = "~/Views/Shared/_mPageing.cshtml";
}
<div class="conten-primary">
    <h3>
        <em>最新</em>榜单</h3>
    <ul data-role="listview" data-split-icon="gear" data-dividertheme="d">
        @foreach (var album in Model)
        { <li><a href="@Url.Action("mDetails", "Store",
                                            new { id = album.AlbumId })">
        <img alt="@album.Title" src="@album.AlbumArtUrl" />
        <h3>@album.Title</h3>
        <p>@album.Title</p>
    </a><a href= "@Html.Raw("#purchase"+album.AlbumId)" data-rel="popup" data-position-to="window" data-transition="pop">
        购买专辑</a> </li>
        }
    </ul>
    @foreach (var album in Model)
    {
        <div data-role="popup" id="@Html.Raw("purchase"+album.AlbumId)"data-theme="d" data-overlay-theme="b" class="ui-content"
        style="max-width: 340px;">
        <h3>
            添加到购物车?</h3>
        <p>
            添加 @Html.Raw(album.Title) 到购物车</p>
        <a href="/ShoppingCart/mAddToCart/@album.AlbumId" data-role="button" data-theme="b" data-icon="check"
            data-inline="true" data-mini="true">Buy: $@album.Price</a> <a href="/home/mindex" data-role="button"
                data-rel="back" data-inline="true" data-mini="true">取消</a>
    </div>
    }
     
</div>
